package cn.secby.pay.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.*;
import cn.secby.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import cn.secby.common.core.web.domain.BaseEntity;

/**
 * 交易渠道对象 tb_pay_channel
 * @author shenkunlin
 * @date 2025-05-08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "tb_pay_channel")
public class PayChannel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value ="id" ,type = IdType.ASSIGN_ID )
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;

    /** 通道名称 */
    @Excel(name = "通道名称")
    @TableField(value = "channel_name")
    private String channelName;

    /** 通道唯一标记 */
    @Excel(name = "通道唯一标记")
    @TableField(value = "channel_label")
    private String channelLabel;

    /** 域名 */
    @Excel(name = "域名")
    @TableField(value = "domain")
    private String domain;

    /** 商户appid */
    @Excel(name = "商户appid")
    @TableField(value = "app_id")
    private String appId;

    /** 支付公钥 */
    @Excel(name = "支付公钥")
    @TableField(value = "public_key")
    private String publicKey;

    /** 商户私钥 */
    @Excel(name = "商户私钥")
    @TableField(value = "merchant_private_key")
    private String merchantPrivateKey;

    /** 其他配置 */
    @Excel(name = "其他配置")
    @TableField(value = "other_config")
    private String otherConfig;

    /** AES混淆密钥 */
    @Excel(name = "AES混淆密钥")
    @TableField(value = "encrypt_key")
    private String encryptKey;

    /** 回调地址 */
    @Excel(name = "回调地址")
    @TableField(value = "notify_url")
    private String notifyUrl;

    /** 是否有效 */
    @Excel(name = "是否有效")
    @TableField(value = "enable_flag")
    private String enableFlag;

    /** 商户ID【系统内部识别使用】 */
    @Excel(name = "商户ID【系统内部识别使用】")
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /** 是否删除  1 未删除  2 已删除 */
    @Excel(name = "是否删除  1 未删除  2 已删除")
    @TableField(value = "is_delete")
    @TableLogic(value = "1", delval = "2")
    private Integer isDelete;

}
